[fix](aggregate) Fix nullable aggregate visitor dispatch#64885
[fix](aggregate) Fix nullable aggregate visitor dispatch#64885morrySnow wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Bool aggregate functions such as bool_and, bool_or, and bool_xor extend NullableAggregateFunction, but their AggregateFunctionVisitor default methods delegated directly to visitAggregateFunction. This bypassed visitor implementations that specialize NullableAggregateFunction. Route these bool aggregate visitor methods through visitNullableAggregateFunction and add a unit test that verifies all current NullableAggregateFunction defaults dispatch to the nullable visitor path.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run org.apache.doris.nereids.trees.expressions.visitor.AggregateFunctionVisitorTest
- cd fe && mvn checkstyle:check -pl fe-core
- Behavior changed: Yes. Nullable bool aggregate functions now use the NullableAggregateFunction visitor default path.
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
|
run buildall |
There was a problem hiding this comment.
Reviewed the two-file PR for nullable aggregate visitor dispatch. I did not find a blocking issue or a valuable inline comment to add.
Critical checkpoint conclusions:
- Goal/test: The change fixes
BoolAnd,BoolOr, andBoolXorso their visitor defaults dispatch throughvisitNullableAggregateFunction; this matches theirNullableAggregateFunctionhierarchy and theAdjustAggregateNullableForEmptySetpath that rewrites empty-group aggregate nullability. The added JUnit reflection test covers the current concrete nullable aggregate visitor methods, includingForEachCombinator. - Scope: The production change is small and focused: three default visitor dispatch calls plus one targeted test.
- Parallel paths: I checked the remaining aggregate visitor defaults against the aggregate class hierarchy; the methods still dispatching to
visitAggregateFunctioncorrespond to non-nullable/base aggregate paths, while the current nullable aggregate subclasses are covered by nullable dispatch. A static comparison found no current nullable subclass missing from the new test list. - Concurrency/lifecycle/config/compatibility/transactions/storage/observability: Not applicable to this FE visitor-dispatch change; no new config, protocol, persisted state, locking, or runtime lifecycle behavior is introduced.
- Test/style validation:
git diff --check FETCH_HEAD..HEADpassed. I did not run FE unit tests because this checkout lacksthirdparty/installedandthirdparty/installed/bin/protoc, and FE AGENTS instructions require stopping before FE build/test when protoc is absent.
User focus: No additional user-provided focus was present.
Subagent conclusions: optimizer-rewrite and tests-session-config both reported no candidates in their initial passes. After the main ledger was updated with a no-inline-comment proposed final set, convergence round 1 ended with both subagents replying NO_NEW_VALUABLE_FINDINGS for the same current ledger/comment set.
TPC-H: Total hot run time: 29198 ms |
TPC-DS: Total hot run time: 172000 ms |
ClickBench: Total hot run time: 25.22 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
What problem does this PR solve?
related to #55643
Problem Summary: Bool aggregate functions such as bool_and, bool_or, and bool_xor extend NullableAggregateFunction, but their AggregateFunctionVisitor default methods delegated directly to visitAggregateFunction. This bypassed visitor implementations that specialize NullableAggregateFunction. Route these bool aggregate visitor methods through visitNullableAggregateFunction and add a unit test that verifies all current NullableAggregateFunction defaults dispatch to the nullable visitor path.
Release note
None
Check List (For Author)